<%--
说明：QUARTZ 增加/修改页面

@author liuxun 2012-11-28
--%>
<%@ include file="../../common/common.jsp"%>
<%
	response.setHeader("Pragma", "No-cache");
	response.setHeader("Cache-Control", "no-cache");
	response.setDateHeader("Expires", 0);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312" />
<meta http-equiv="Expires" content="0" />
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Pragma" content="no-cache" />

<title><c:if test="${operationType == 0 }">新增</c:if> <c:if test="${ operationType == 1}">编辑</c:if>定时任务管理</title>
<script src="jsp/platform/qrtz/qrtz_edit.js" type="text/javascript" charset="UTF-8"></script>
</head>

<body>

  <form id="opeForm" name="opeForm" method="post" action="">

    <%-- 操作类型 0录入 1修改 --%>
    <input type="hidden" id="operationType" name="operationType" value="${operationType}" />

    <table style="width: 100%; height: 100%" border="0" cellpadding="0" cellspacing="0" class="editDisplay">
      <tr>
        <td valign="top">
          <%--编辑页面名称标题表格--%>
          <table style="width: 100%" border="0" cellpadding="0" cellspacing="0" class="editCaption">
            <tr>
              <td height="30">&nbsp;</td>
            </tr>
            <tr>
              <td align="center"><font class="editCaptionTitle"><c:if test="${operationType == 0 }">新增</c:if> <c:if test="${ operationType == 1}">编辑</c:if>定时任务管理</font></td>
            </tr>
            <tr>
              <td height="5"></td>
            </tr>
          </table> <%--编辑部分表格--%>

          <table border="0" align="center" cellpadding="0" cellspacing="0" class="editTableBorder">
            <tr>
              <td>
                <fieldset>
                  <legend>任务基本信息</legend>
                  <table border="0" align="center" cellpadding="0" cellspacing="0" class="editMainTable">
                    <tr>
                      <td style="height: 20px;" colspan="2" class="editMainConstLabelTD">&nbsp;</td>
                    </tr>

                    <tr>
                      <td class="editMainLabelTD" align="right" style="width: 40%;">任务名：&nbsp;</td>
                      <td class="editMainTD" align="left" nowrap="nowrap"><input type="text" id="jobName" name="model.jobName" required="true" validType="maxLength[50]" class="easyui-validatebox  editMainText" value="${model.jobName }" <c:if test="${operationType != 0 }">readonly</c:if> /> &nbsp;<span><font color="red">*</font> </span>
                      </td>
                    </tr>

                    <tr>
                      <td class="editMainLabelTD" align="right" style="width: 40%;">类名：&nbsp;</td>
                      <td class="editMainTD" align="left" nowrap="nowrap"><input type="text" id="jobClassName" name="model.jobClassName" required="true" validType="" class="easyui-validatebox  editMainText" value="${model.jobClassName }" /> &nbsp;<span><font color="red">*</font> </span>
                      </td>
                    </tr>

                  </table>
                </fieldset>

                <fieldset>
                  <legend>调度基本信息</legend>
                  <table border="0" align="center" cellpadding="0" cellspacing="0" class="editMainTable">
                    <tr>
                      <td class="editMainLabelTD" align="right" style="width: 40%;">开始时间：&nbsp;</td>
                      <td class="editMainTD" align="left" nowrap="nowrap"><input type="text" id="startTime" name="model.startTime" readonly="readonly" validType="maxLength[50]" class="easyui-validatebox  editMainText" value="${model.startTime }" /><img src="<c:url value="/images/datetimepicker_css/cal.gif" />" onclick="javascript:NewCssCal ('startTime','yyyyMMdd','dropdown',true,'24',true)" style="cursor: pointer" /> &nbsp;</td>
                    </tr>

                    <tr>
                      <td class="editMainLabelTD" align="right" style="width: 40%;">停止时间：&nbsp;</td>
                      <td class="editMainTD" align="left" nowrap="nowrap"><input type="text" id="endTime" name="model.endTime" readonly="readonly" validType="maxLength[50]" class="easyui-validatebox  editMainText" value="${model.endTime }" /><img src="<c:url value="/images/datetimepicker_css/cal.gif" />" onclick="javascript:NewCssCal ('endTime','yyyyMMdd','dropdown',true,'24',true)" style="cursor: pointer" /> &nbsp;</td>
                    </tr>

                    <tr>
                      <td class="editMainLabelTD" align="right" style="width: 40%;">重复次数：&nbsp;</td>
                      <td class="editMainTD" align="left" nowrap="nowrap">
                        <select id="repeatCount" name="model.repeatCount" value="${model.repeatCount }" class="easyui-validatebox  editMainText">
                          <option value="0" <c:if test="${model.repeatCount==0}">selected</c:if>>一次</option>
                          <option value="-1" <c:if test="${model.repeatCount==-1}">selected</c:if>>重复</option>
                        </select>
                      </td>
                    </tr>

                    <tr>
                      <td class="editMainLabelTD" align="right" style="width: 40%;">重复间隔 ：&nbsp;</td>
                      <td class="editMainTD" align="left" nowrap="nowrap"><input type="text" id="repeatInterval" name="model.repeatInterval" validType="" class="easyui-validatebox  editMainText" value="${model.repeatInterval }" />分钟 &nbsp;</td>
                    </tr>
                  </table>
                </fieldset>
                
                <fieldset>
                  <legend>属性基本信息</legend>
                  <table border="0" align="center" cellpadding="0" cellspacing="0" class="editMainTable">
                    <tr>
                      <td class="editMainLabelTD" align="right" style="width: 50%;">参数名</td>
                      <td class="editMainTD" align="left" nowrap="nowrap">参数值</td>
                    </tr>
                    
                    <c:forEach items="${model.jobDataMap}" var="item" varStatus="status">
                      <tr>
                        <td class="editMainLabelTD" align="right" style="width: 40%;"><input type="text" name="parameterNames" class="editMainText" value="${item.key}" />
                        </td>
                        <td class="editMainTD" align="left" nowrap="nowrap"><input type="text" name="parameterValues" class="editMainText" value="${item.value}" />
                        </td>
                      </tr>

                      <c:if test="${status.last}">
                        <c:forEach begin="0" end="${maxParameterRows - status.count -1}">
                          <tr>
                            <td class="editMainLabelTD" align="right" style="width: 40%;"><input type="text" name="parameterNames" class="editMainText" value="" />
                            </td>
                            <td class="editMainTD" align="left" nowrap="nowrap"><input type="text" name="parameterValues" class="editMainText" value="" />
                            </td>
                          </tr>
                        </c:forEach>
                      </c:if>
                    </c:forEach>

                    <c:if test="${empty model.jobDataMap}">
                      <c:forEach begin="0" end="${maxParameterRows}">
                        <tr>
                          <td class="editMainLabelTD" align="right" style="width: 40%;"><input type="text" name="parameterNames" class="editMainText" value="" />
                          </td>
                          <td class="editMainTD" align="left" nowrap="nowrap"><input type="text" name="parameterValues" class="editMainText" value="" />
                          </td>
                        </tr>
                      </c:forEach>
                    </c:if>

                  </table>
                </fieldset>
                
                </td>
            </tr>
            
            <tr>
              <td class="editMainConstTD" colspan="2">&nbsp;&nbsp;说明：带<span><font color="red">*</font> </span>的项目是必须填写项</td>
            </tr>
            <tr>
              <td colspan="2" class="editMainBottomTD">&nbsp;
                <div style="text-align: center; padding: 5px;">
                  <a href="javascript:void(0)" id="okBtn" icon="icon-save" class="easyui-linkbutton">保存</a> <a href="javascript:void(0)" id="cancelBtn" icon="icon-cancel" class="easyui-linkbutton">取消</a>
                </div>
              </td>
            </tr>
          </table></td>
      </tr>
    </table>

  </form>
</body>
</html>